
sort_string.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <main>:
#define HALT 	" "

void stsrt(char *string[], int num);

int main()
{
   0:	e92d4800 	push	{fp, lr}
   4:	e28db004 	add	fp, sp, #4
   8:	e24dde6b 	sub	sp, sp, #1712	; 0x6b0
	char input[LIM][SIZE];
	char *ptstr[LIM];
	int ct = 0; 
   c:	e3a03000 	mov	r3, #0
  10:	e50b3008 	str	r3, [fp, #-8]
	int k;

	printf("Input up to %d lines, and I will sort them.\n", LIM);
  14:	e3a01014 	mov	r1, #20
  18:	e59f0144 	ldr	r0, [pc, #324]	; 164 <main+0x164>
  1c:	ebfffffe 	bl	0 <printf>
	printf("To stop, press the Enter key at a line's start.\n");
  20:	e59f0140 	ldr	r0, [pc, #320]	; 168 <main+0x168>
  24:	ebfffffe 	bl	0 <puts>
	while (ct < LIM && gets(input[ct]) != NULL && input[ct][0] != '\0') {
  28:	ea000011 	b	74 <main+0x74>
		ptstr[ct] = input[ct];
  2c:	e24b2e65 	sub	r2, fp, #1616	; 0x650
  30:	e2422004 	sub	r2, r2, #4
  34:	e242200c 	sub	r2, r2, #12
  38:	e51b1008 	ldr	r1, [fp, #-8]
  3c:	e1a03001 	mov	r3, r1
  40:	e1a03183 	lsl	r3, r3, #3
  44:	e0833001 	add	r3, r3, r1
  48:	e1a01183 	lsl	r1, r3, #3
  4c:	e0833001 	add	r3, r3, r1
  50:	e0822003 	add	r2, r2, r3
  54:	e51b3008 	ldr	r3, [fp, #-8]
  58:	e1a03103 	lsl	r3, r3, #2
  5c:	e24b1004 	sub	r1, fp, #4
  60:	e0813003 	add	r3, r1, r3
  64:	e50326ac 	str	r2, [r3, #-1708]	; 0xfffff954
		ct++;
  68:	e51b3008 	ldr	r3, [fp, #-8]
  6c:	e2833001 	add	r3, r3, #1
  70:	e50b3008 	str	r3, [fp, #-8]
	int ct = 0; 
	int k;

	printf("Input up to %d lines, and I will sort them.\n", LIM);
	printf("To stop, press the Enter key at a line's start.\n");
	while (ct < LIM && gets(input[ct]) != NULL && input[ct][0] != '\0') {
  74:	e51b3008 	ldr	r3, [fp, #-8]
  78:	e3530013 	cmp	r3, #19
  7c:	ca00001b 	bgt	f0 <main+0xf0>
  80:	e24b2e65 	sub	r2, fp, #1616	; 0x650
  84:	e2422004 	sub	r2, r2, #4
  88:	e242200c 	sub	r2, r2, #12
  8c:	e51b1008 	ldr	r1, [fp, #-8]
  90:	e1a03001 	mov	r3, r1
  94:	e1a03183 	lsl	r3, r3, #3
  98:	e0833001 	add	r3, r3, r1
  9c:	e1a01183 	lsl	r1, r3, #3
  a0:	e0833001 	add	r3, r3, r1
  a4:	e0823003 	add	r3, r2, r3
  a8:	e1a00003 	mov	r0, r3
  ac:	ebfffffe 	bl	0 <gets>
  b0:	e1a03000 	mov	r3, r0
  b4:	e3530000 	cmp	r3, #0
  b8:	0a00000c 	beq	f0 <main+0xf0>
  bc:	e51b2008 	ldr	r2, [fp, #-8]
  c0:	e1a03002 	mov	r3, r2
  c4:	e1a03183 	lsl	r3, r3, #3
  c8:	e0833002 	add	r3, r3, r2
  cc:	e1a02183 	lsl	r2, r3, #3
  d0:	e0833002 	add	r3, r3, r2
  d4:	e24b2004 	sub	r2, fp, #4
  d8:	e0823003 	add	r3, r2, r3
  dc:	e2433e65 	sub	r3, r3, #1616	; 0x650
  e0:	e243300c 	sub	r3, r3, #12
  e4:	e5d33000 	ldrb	r3, [r3]
  e8:	e3530000 	cmp	r3, #0
  ec:	1affffce 	bne	2c <main+0x2c>
		ptstr[ct] = input[ct];
		ct++;
	}

	stsrt(ptstr, ct);
  f0:	e24b3e6a 	sub	r3, fp, #1696	; 0x6a0
  f4:	e2433004 	sub	r3, r3, #4
  f8:	e243300c 	sub	r3, r3, #12
  fc:	e51b1008 	ldr	r1, [fp, #-8]
 100:	e1a00003 	mov	r0, r3
 104:	ebfffffe 	bl	170 <stsrt>

	puts("\nHere's the sorted list: \n");
 108:	e59f005c 	ldr	r0, [pc, #92]	; 16c <main+0x16c>
 10c:	ebfffffe 	bl	0 <puts>
	for (k = 0; k < ct; k++)
 110:	e3a03000 	mov	r3, #0
 114:	e50b300c 	str	r3, [fp, #-12]
 118:	ea000009 	b	144 <main+0x144>
		puts(ptstr[k]);
 11c:	e51b300c 	ldr	r3, [fp, #-12]
 120:	e1a03103 	lsl	r3, r3, #2
 124:	e24b2004 	sub	r2, fp, #4
 128:	e0823003 	add	r3, r2, r3
 12c:	e51336ac 	ldr	r3, [r3, #-1708]	; 0xfffff954
 130:	e1a00003 	mov	r0, r3
 134:	ebfffffe 	bl	0 <puts>
	}

	stsrt(ptstr, ct);

	puts("\nHere's the sorted list: \n");
	for (k = 0; k < ct; k++)
 138:	e51b300c 	ldr	r3, [fp, #-12]
 13c:	e2833001 	add	r3, r3, #1
 140:	e50b300c 	str	r3, [fp, #-12]
 144:	e51b200c 	ldr	r2, [fp, #-12]
 148:	e51b3008 	ldr	r3, [fp, #-8]
 14c:	e1520003 	cmp	r2, r3
 150:	bafffff1 	blt	11c <main+0x11c>
		puts(ptstr[k]);

	return 0;
 154:	e3a03000 	mov	r3, #0
}
 158:	e1a00003 	mov	r0, r3
 15c:	e24bd004 	sub	sp, fp, #4
 160:	e8bd8800 	pop	{fp, pc}
 164:	00000000 	.word	0x00000000
 168:	00000030 	.word	0x00000030
 16c:	00000060 	.word	0x00000060

00000170 <stsrt>:

void stsrt(char *string[], int num)
{
 170:	e92d4800 	push	{fp, lr}
 174:	e28db004 	add	fp, sp, #4
 178:	e24dd018 	sub	sp, sp, #24
 17c:	e50b0018 	str	r0, [fp, #-24]	; 0xffffffe8
 180:	e50b101c 	str	r1, [fp, #-28]	; 0xffffffe4
	char *temp;
	int top, seek;

	for (top = 0; top < num - 1; top++)
 184:	e3a03000 	mov	r3, #0
 188:	e50b3008 	str	r3, [fp, #-8]
 18c:	ea000032 	b	25c <stsrt+0xec>
		for (seek = top + 1; seek < num; seek++)
 190:	e51b3008 	ldr	r3, [fp, #-8]
 194:	e2833001 	add	r3, r3, #1
 198:	e50b300c 	str	r3, [fp, #-12]
 19c:	ea000027 	b	240 <stsrt+0xd0>
			if (strcmp(string[top], string[seek]) > 0) {
 1a0:	e51b3008 	ldr	r3, [fp, #-8]
 1a4:	e1a03103 	lsl	r3, r3, #2
 1a8:	e51b2018 	ldr	r2, [fp, #-24]	; 0xffffffe8
 1ac:	e0823003 	add	r3, r2, r3
 1b0:	e5930000 	ldr	r0, [r3]
 1b4:	e51b300c 	ldr	r3, [fp, #-12]
 1b8:	e1a03103 	lsl	r3, r3, #2
 1bc:	e51b2018 	ldr	r2, [fp, #-24]	; 0xffffffe8
 1c0:	e0823003 	add	r3, r2, r3
 1c4:	e5933000 	ldr	r3, [r3]
 1c8:	e1a01003 	mov	r1, r3
 1cc:	ebfffffe 	bl	0 <strcmp>
 1d0:	e1a03000 	mov	r3, r0
 1d4:	e3530000 	cmp	r3, #0
 1d8:	da000015 	ble	234 <stsrt+0xc4>
				temp = string[top];
 1dc:	e51b3008 	ldr	r3, [fp, #-8]
 1e0:	e1a03103 	lsl	r3, r3, #2
 1e4:	e51b2018 	ldr	r2, [fp, #-24]	; 0xffffffe8
 1e8:	e0823003 	add	r3, r2, r3
 1ec:	e5933000 	ldr	r3, [r3]
 1f0:	e50b3010 	str	r3, [fp, #-16]
				string[top] = string[seek];
 1f4:	e51b3008 	ldr	r3, [fp, #-8]
 1f8:	e1a03103 	lsl	r3, r3, #2
 1fc:	e51b2018 	ldr	r2, [fp, #-24]	; 0xffffffe8
 200:	e0823003 	add	r3, r2, r3
 204:	e51b200c 	ldr	r2, [fp, #-12]
 208:	e1a02102 	lsl	r2, r2, #2
 20c:	e51b1018 	ldr	r1, [fp, #-24]	; 0xffffffe8
 210:	e0812002 	add	r2, r1, r2
 214:	e5922000 	ldr	r2, [r2]
 218:	e5832000 	str	r2, [r3]
				string[seek] = temp;
 21c:	e51b300c 	ldr	r3, [fp, #-12]
 220:	e1a03103 	lsl	r3, r3, #2
 224:	e51b2018 	ldr	r2, [fp, #-24]	; 0xffffffe8
 228:	e0823003 	add	r3, r2, r3
 22c:	e51b2010 	ldr	r2, [fp, #-16]
 230:	e5832000 	str	r2, [r3]
{
	char *temp;
	int top, seek;

	for (top = 0; top < num - 1; top++)
		for (seek = top + 1; seek < num; seek++)
 234:	e51b300c 	ldr	r3, [fp, #-12]
 238:	e2833001 	add	r3, r3, #1
 23c:	e50b300c 	str	r3, [fp, #-12]
 240:	e51b200c 	ldr	r2, [fp, #-12]
 244:	e51b301c 	ldr	r3, [fp, #-28]	; 0xffffffe4
 248:	e1520003 	cmp	r2, r3
 24c:	baffffd3 	blt	1a0 <stsrt+0x30>
void stsrt(char *string[], int num)
{
	char *temp;
	int top, seek;

	for (top = 0; top < num - 1; top++)
 250:	e51b3008 	ldr	r3, [fp, #-8]
 254:	e2833001 	add	r3, r3, #1
 258:	e50b3008 	str	r3, [fp, #-8]
 25c:	e51b301c 	ldr	r3, [fp, #-28]	; 0xffffffe4
 260:	e2432001 	sub	r2, r3, #1
 264:	e51b3008 	ldr	r3, [fp, #-8]
 268:	e1520003 	cmp	r2, r3
 26c:	caffffc7 	bgt	190 <stsrt+0x20>
			if (strcmp(string[top], string[seek]) > 0) {
				temp = string[top];
				string[top] = string[seek];
				string[seek] = temp;
			}
}
 270:	e24bd004 	sub	sp, fp, #4
 274:	e8bd8800 	pop	{fp, pc}
